package com.design.mode.factory;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by lucky on 2018/9/14.
 */
public class IDCardFactory extends Factory {

    private List list = new ArrayList();

    public Product createProduct(String owner) {
        return new IDCard(owner);
    }

    public void registerProduct(Product product) {
        list.add(((IDCard)product).getOwner());
    }

    public List<Product> getOwners(){
        return list;
    }
}
